package io.renren.modules.app.entity;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Auther zxl
 * @Date 2018/12/18 16:09
 * @Description 支付宝部分异步通知参数
 **/
@TableName("app_order_pay")
public class AlipayNotifyEntity implements Serializable {

    /**
     * 表自增id
     */
    @TableId(value = "id",type = IdType.AUTO)
    Integer id;


    /**
     * 通知的发送时间
     */
//    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableId(value = "notify_time")
    Date notifyTime;

    /**
     * retuen发送的时间
     */
//    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableId(value = "return_time")
    Date returnTime;

    /**
     * 支付宝交易号
     */
    @TableId(value = "trade_no")
    String tradeNo;

    /**
     * 原支付请求的商户订单号
     */
    @TableId(value = "order_id")
    String orderId;

    /**
     * 买家支付宝账号
     */
    @TableId(value = "buyer_logon_id")
    String buyerLogonId;

    /**
     * 交易状态
     * WAIT_BUYER_PAY   交易创建，等待买家付款
     * TRADE_CLOSED	    未付款交易超时关闭，或支付完成后全额退款
     * TRADE_SUCCESS	交易支付成功
     * TRADE_FINISHED	交易结束，不可退款
     */
    @TableId(value = "trade_status")
    String tradeStatus;

    /**
     * 订单金额
     */
    @TableId(value = "total_amount")
    Double totalAmount;

    /**
     * 付款金额
     */
    @TableId(value = "buyer_pay_amount")
    Double buyerPayAmount;


    @TableId(value = "create_time")
    Date createTime;

    /**
     * 已退款的总金额
     */
    @TableId(value = "refund_fee")
    Double refundFee;

    /**
     * 退款请求流水号
     */
    @TableId(value = "out_request_no")
    String outRequestNo;

    /**
     * 退款时间
     */
    @TableId(value = "refund_time")
    Date refundTime;

    public Double getRefundFee() {
        return refundFee;
    }

    public void setRefundFee(Double refundFee) {
        this.refundFee = refundFee;
    }

    public String getOutRequestNo() {
        return outRequestNo;
    }

    public void setOutRequestNo(String outRequestNo) {
        this.outRequestNo = outRequestNo;
    }

    public Date getRefundTime() {
        return refundTime;
    }

    public void setRefundTime(Date refundTime) {
        this.refundTime = refundTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getNotifyTime() {
        return notifyTime;
    }

    public void setNotifyTime(Date notifyTime) {
        this.notifyTime = notifyTime;
    }

    public Date getReturnTime() {
        return returnTime;
    }

    public void setReturnTime(Date returnTime) {
        this.returnTime = returnTime;
    }

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getBuyerLogonId() {
        return buyerLogonId;
    }

    public void setBuyerLogonId(String buyerLogonId) {
        this.buyerLogonId = buyerLogonId;
    }

    public String getTradeStatus() {
        return tradeStatus;
    }

    public void setTradeStatus(String tradeStatus) {
        this.tradeStatus = tradeStatus;
    }

    public Double getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(Double totalAmount) {
        this.totalAmount = totalAmount;
    }

    public Double getBuyerPayAmount() {
        return buyerPayAmount;
    }

    public void setBuyerPayAmount(Double buyerPayAmount) {
        this.buyerPayAmount = buyerPayAmount;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
